package com.duoduo.admin.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import lombok.Data;

@Entity
@Data
@EntityListeners(AuditingEntityListener.class)
public class SysOauthClientDetails implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3531053299333082637L;
	@Id
    @GenericGenerator(name = "uuid-hex", strategy = "org.hibernate.id.UUIDGenerator")
    @GeneratedValue(generator = "uuid-hex")
     /**
	 * 客户端ID
	 */
	private String clientId;
     /**
	 * 资源列表
	 */
	private String resourceIds;
     /**
	 * 客户端密钥
	 */
	private String clientSecret;
     /**
	 * 域
	 */
	private String scope;
     /**
	 * 认证类型
	 */
	private String authorizedGrantTypes;
     /**
	 * 重定向地址
	 */
	private String webServerRedirectUri;
     /**
	 * 角色列表
	 */
	private String authorities;
     /**
	 * token 有效期
	 */
	private Integer accessTokenValidity;
     /**
	 * 刷新令牌有效期
	 */
	private Integer refreshTokenValidity;
     /**
	 * 令牌扩展字段JSON
	 */
	private Boolean additionalInformation;
     /**
	 * 是否自动放行
	 */
	private String autoapprove;
     /**
	 * 创建人
	 */
    @CreatedBy
	private String createBy;
     /**
	 * 创建时间
	 */
    @CreatedDate
	private LocalDateTime createTime;
     /**
	 * 修改人
	 */
    @LastModifiedBy
	private String updateBy;
     /**
	 * 更新时间
	 */
    @LastModifiedDate
	private LocalDateTime updateTime;

}
